<?php
class AdminController extends Controller
{
    public $layout='//layouts/mainAdmin';
    
    protected function beforeAction($event)
    {
        if(!Yii::app()->session['admin'])
            $this->redirect('index.php?r=adminLogin/form');
        return true;
    }
}
?>
